<!DOCTYPE html>
<html>
<body>

<p id="demo"></p>

<script>
function doResize() {
		caW = v ? window.innerWidth: 400;
		caH = v ? window.innerHeight: 600;
		caObj.width = caW;
		caObj.height = caH;
		var caL = (window.innerWidth - caW) * 0.5,
		caT = (window.innerHeight - caH) * 0.5;
		caObj.style.position = "absolute";
		caObj.style.left = caL + "px";
		caObj.style.top = caT +"px";
		cellW = caW / colC;
		cellH = caH / rowC;
		downSpeed = cellH * 0.4  +0.5;
		//downSpeed = 10;
		curOffset = -cellH;
		if(!v){
			caObjWOffset =parseFloat(caObj.style.left.replace("px",""));
			caObjHOffset = parseFloat(caObj.style.top.replace("px",""));
		}
		doResize();

	}
	x=document.getElementById("demo");
	x.innerHTML="宽度:"+400", 高度:" +300 +"."
</script>
<p id="demo"></p>
</body>
</html>

